package com.stox.ui.javafx.core.widget.wrapper;

import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.scene.Node;

public class Button extends javafx.scene.control.Button {

	private static final Insets insets = new Insets(2,2,2,2);
	
	private void init() {
		setPrefSize(25, 25);
		setPadding(insets);
	}
	
	public Button() {
		init();
	}

	public Button(String paramString) {
		super(paramString);
		init();
	}
	
	public Button(String paramString, Node paramNode) {
		super(paramString, paramNode);
		init();
	}

	public Button(EventHandler<ActionEvent> eventHandler) {
		this();
		setOnAction(eventHandler);
		init();
	}
	
	public Button(String text, EventHandler<ActionEvent> eventHandler) {
		this(text);
		setOnAction(eventHandler);
		init();
	}
	
	public Button(Node node, EventHandler<ActionEvent> eventHandler) {
		this();
		
		setGraphic(node);
		setOnAction(eventHandler);
	}
	
}
